<?php $this->load->view('header'); ?>
<?php $this->load->view('cuerpo'); ?>

<div class="formulario">
	<form name="Rbuscar_marcas" action="<?php echo base_url(); ?>index.php/proveedor/actualizaMarcas" method="POST">
		<fieldset>
			<legend>Buscar</legend>
			<table>
				 <tr>
					<td><label>Proveedor:</label></td>
					<td>
					<input type="text" name="txtUsuario" size="50" oninput="busca_marca()" 
					<?php if(isset($nom_proveedor)){ ?>
						value="<?php echo $nom_proveedor;
					}?>"
					<?php if (isset($usuario)) { ?>
						value="<?php echo $usuario;
					}?>" 
					pattern='[a-zA-Z0-9_]{0,40}' maxlength="40" required>
					<input type="hidden" name="txtCodigo"
						value="<?php if (isset($idSolUsuario)){echo $idSolUsuario;}else{ echo '';}?>">
					</td>
				</tr>
				<!--<tr>
					<td><label>Proveedor:</label></td>
					<td>
						<div id="marcaAsignar">
							<input type="text" name="txtNombre" size="50" disabled>
						</div>
					</td>
				</tr>-->
			</table>
		</fieldset>		
		<fieldset>			
			<table>
				<tr>
					<td style="vertical-align:middle; text-align:center;width: 45%;">
						<fieldset>
							<legend>Marcas</legend>
							<div  id="sinmarcas">
								<select size="6" name="marca_origen[]" id="marca_origen" multiple="multiple">
									<option value="">
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									</option>
									<!--<?php foreach ($marcas as $m) {?>
									<option value="<?php echo $m->id_marca; ?>">
										<?php echo $m->nombre;?>
									</option>
									<?php } ?>-->
								</select>
							</div>
						</fieldset>
					</td>
					<td style="vertical-align:middle; text-align:center;" >
						<input type="button" class="pasar izq" name="pasar" value="Pasar »">
						<input type="button" class="quitar der" name="quitar" value="« Quitar"><br>
						<input type="button" class="pasartodos izq" name="todos" value="Todos »">
						<input type="button" class="quitartodos der" name="quitartodos" value="« Todos">
					</td>
					<td style="vertical-align:middle; text-align:center;width: 45%;">
						<fieldset>
							<legend>Marcas a cotizar</legend>
							<div  id="conmarcas">
								<select size="6" name="marca_destino[]" id="marca_destino" multiple="multiple" onchange="opcionSelected()" required>
									<option value="">
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									</option>
								</select>
							</div>						
						</fieldset>
					</td>
				</tr>
				<tr>
					<td colspan="3" style="vertical-align:middle; text-align:center;">
						<input type="submit" value="Guardar" name="guardar" id="guardar" onclick="return confirm('¿Está seguro de establecer las marcas?')">
						<input type="button" onclick="location.href='<?php echo base_url();?>index.php/usuario'" value="Cancelar">						
					</td>
				</tr>
			</table>
		</fieldset>
	</form>	
</div>

<?php $this->load->view('footer'); ?>